<?php
/**
*
* @desc		Management of ajax content, used to generate javascript code
*
* @auhtor  	menTiss
* @package	Helper
* @version 	1.0
* 
* @date 		01/11/2007
* 
* @access 	public
*/
function ajax_initContext($controller, $method, $libs = array()){
	$loader =& Loader::getInstance() ;
	try {
		if(!$loader->controllerExists($controller, $method)) 
			throw new Exception('AJAX_CONTROLLER_NOT_EXISTS') ;
		
		if(count($libs) > 0) {
			// get ajax library needed by template system
			foreach($libs as $library) {
				ajax_loadLibrary($library) ;
			}
		}
		// generate AJAX code
		$string = '' ;
		
	} catch(Exception $e) {
		return ajax_exception($e->getMessage());
	} 	
}
function ajax_loadLibrary($library){
	$loader =& Loader::getInstance() ;
	
	
}
function ajax_onCreate($type, $function = null) {
	$loader =& Loader::getInstance() ;
	
}
?>